package com.itdct.onflow.core.exception

import com.itdct.onflow.core.constant.ReturnCode


/**
 * Created by DCT-Portable on 2021/4/10 17:33.
 * Usage:
 */
open class CommonException : RuntimeException {
    var code: Int
        private set
    var info: String
        private set
    var data: Any? = null
        private set

    constructor(info: String) : super(info) {
        this.code = ReturnCode.SYSTEM_ERROR
        this.info = info
    }

    constructor(code: Int, info: String) : super(info) {
        this.code = code
        this.info = info
    }

    constructor(code: Int, info: String, data: Any?) : super(info) {
        this.code = code
        this.info = info
        this.data = data
    }
}
